const oneMinute = 1000 * 60
const oneHoure = 1000 * 60 * 60

const config = {
  port: '8000',
  // 数据库配置
  getDatabase () {
      return {
        DATABASE: 'koa',
        USERNAME: process.env['mysql.user'] || 'root',
        PASSWORD: process.env.MYSQL_PWD || '11111111',
        PORT: process.env['mysql.port'],
        HOST: '39.96.14.26',
        // HOST: process.env['mysql.host'],
      }
  },
  session: {
    key: 'koa:sess',   //cookie key (default is koa:sess)
    maxAge: oneMinute,  // cookie的过期时间 maxAge in ms (default is 1 days)
    overwrite: true,  //是否可以overwrite    (默认default true)
    httpOnly: true, //cookie是否只有服务器端可以访问 httpOnly or not (default true)
    signed: true,   //签名默认true
    rolling: false,  //在每次请求时强行设置cookie，这将重置cookie过期时间（默认：false）
    renew: false,  //(boolean) renew session when session is nearly expired,
  },
  SECRET: 'what are u talking about',
  jwtExpiresIn: '1m',
}

module.exports = config

